using System;
using System.Collections.Generic;
using System.Text;
using System.ComponentModel.Design;
using System.Windows.Forms;
using System.Drawing;
using System.ComponentModel;
using System.Collections;
using EnvDTE;
using System.Windows.Forms.Design;
using System.Security.Permissions;

namespace XnaDesignerGenerator
{
    [ToolboxItemFilter("Microsoft.Xna.Framework", ToolboxItemFilterType.Require)]
    [PermissionSet(SecurityAction.Demand, Name = "FullTrust")]
    public class GameManagerDesigner : ComponentDocumentDesigner, IRootDesigner, IDesigner, IDisposable
    {
        // Methods
        internal T GetService<T>()
        {
            return (T)this.GetService(typeof(T));
        }

        public override void Initialize(IComponent component)
        {
            base.Initialize(component);
        }

        object IRootDesigner.GetView(ViewTechnology technology)
        {
            if (technology != ViewTechnology.Default)
            {
                throw new ArgumentException("The technology supported here is only Default", "technology");
            }
            return new RootDesignerView2(this);
        }

        // Properties
        public GameManager Component
        {
            get
            {
                return (base.Component as GameManager);
            }
        }

        ViewTechnology[] IRootDesigner.SupportedTechnologies
        {
            get
            {
                return new ViewTechnology[] { ViewTechnology.Default };
            }
        }
    }
}
